 <% provide(:title, "Edit Item") %> 
 <%= render 'shared/admin_menu' %>
 <div class="span9">
  <h3 class="header-title"><%=(t "admin.editproduct")%></h3>
  <div class="popover-content">
    <div class="row">
     <div class="span6 ">
      <%= form_for(@product, :url => url_for(:controller => 'admin', :action => 'product_save')) do |f| %>
      <%= render 'shared/error_messages', object: f.object %>

      <%= f.hidden_field :id %>

      <%= f.label :name, (t 'name') %>
      <%= f.text_field :name %>

      <%= f.label :categories, (t 'categories') %>
      <%= f.select(:category_id, 
      Categories.find(:all).collect {|p| [ p.name, p.id ] } ) %>

      <%= f.label :price, (t 'price') %>
      <%= f.text_field :price, {:style => "width:80%", :class => "number", :placeholder => "Only number"} %>
      <select name="products[currency]" style="padding:5px; width:18%;margin-bottom:10px;">
        <option value="$">$</option>
      </select>

      <%= f.label :image, (t "imageurl") %>
      <%= f.text_field :imageurl, {:placeholder => "Url to image"} %>

      <%= f.text_area :description, "cols" => 20, "rows" => 10 %>

      <%= f.submit (t "savechange"), class: "btn btn-large btn-primary" %>
      <% end %>
    </div>
  </div>
</div>
<div style="clear:both"></div>
</div>
